import urllib.request

# timeout参数用法
response2 = urllib.request.urlopen('https://httpbin.org/get', timeout=1)
print(response2.read())